package org.crud4j.wicket.markup.html.browse;

import java.util.List;

import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.crud4j.core.CrudField;
import org.crud4j.wicket.markup.html.viewer.ViewerFactory;

class BrowseColumnsList extends ListView {

	public BrowseColumnsList(String id, List list) {
		super(id, list);
	}

	@Override
	protected void populateItem(ListItem item) {
		CrudField field = (CrudField) item.getModelObject();
		item.add(ViewerFactory.getViewer("viewer", field));
	}

}
